﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Rocket.Core;
using System.ComponentModel;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;

namespace Rocket.Bll.Models
{
    public class QuestionView : BaseObject
    {
        private int _questionId;
        [DisplayName("Unique Question Id")] 
        public int QuestionId
        {
            get { return _questionId; }
            set 
            { 
                _questionId = value;
                Id = value;
            }
        }
        
        private string _text;
        [StringLengthValidator(1, 50,
            MessageTemplate = "Question Text must be between 1 and 50 characters")]
        [DisplayName("Question Text")]
        public string Text
        {
            get { return _text; }
            set { _text = value; }
        }
    }
}
